package com.first.hms.service;

import com.first.hms.entity.Room;
import com.first.hms.mapper.OrderMapper;
import com.first.hms.mapper.RoomMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * 房间服务 (RoomService)
 * 方法：
 *
 * selectRooms(Room room)：查询房间
 * updateRoomState(Room room)：更新房间状态
 * addRoom(Room room) :增加房间*/
@Service
public class RoomService {
    @Autowired
    private RoomMapper roomMapper;

    public ArrayList<Room> selectRooms(Room room)
    {
        return roomMapper.selectRooms(room);
    }
    public int updateRoomState(Room room)
    {
        return roomMapper.updateRoomState(room);
    }

    public int addRoom(Room room)
    {
        return roomMapper.addRoom(room);
    }
}
